using JoyfulHomeJourney.BackEnd.Infrastructure.EFCore;
using JoyfulHomeJourney.BackEnd.Infrastructure.Dtos.Responses.Objects;
using JoyfulHomeJourney.BackEnd.Infrastructure.Tools;
namespace JoyfulHomeJourney.BackEnd.Server.Instances.Extends.Responses
{
	public static class SysCustomersExtend
{
		public static ResponseSysCustomersDto ToResponseDto(this SysCustomers entity)
{			return new ResponseSysCustomersDto
			{
				userId = entity.CUserId,
				account = entity.CAccount,
				email = entity.CEmail,
				phoneNumber = entity.CPhoneNumber,
				lastLoginTime = entity.CLastLoginTime,
				lastLoginTimeStr =Tools.TimeToString(entity.CLastLoginTime),
				avatar = entity.CAvatar,
				gender = entity.CGender,
				birthday = entity.CBirthday,
				birthdayStr =Tools.TimeToString(entity.CBirthday),
				address = entity.CAddress,
				ipAddress = entity.CIpAddress,
				points = entity.CPoints,
				vip = entity.CVip,
				status = entity.CStatus,
				createdAt = entity.CCreatedAt,
				createdAtStr =Tools.TimeToString(entity.CCreatedAt),
				updatedAt = entity.CUpdatedAt,
				updatedAtStr =Tools.TimeToString(entity.CUpdatedAt),
			};
		}
	}
}
